package com.speedricemanager.activity.home.fragmenadapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.speedricemanager.R;

import java.util.List;




/**
 * Created by 李征 on 2017/12/13.
 */

public class SpnnerBaseadadianfu extends BaseAdapter {
    Context context;
    List<String> arraylistcode;

    public SpnnerBaseadadianfu(Context context, List<String> arraylistcode) {
        this.context = context;
        this.arraylistcode = arraylistcode;
    }

    @Override
    public int getCount() {
        return arraylistcode.size();
    }

    @Override
    public Object getItem(int i) {
        return arraylistcode.get(i);
    }

    @Override
    public long getItemId(int i) {
        return 0;
    }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {

        if (view == null) {
            view = View.inflate(context, R.layout.adgustlayout_item, null);
        }
        TextView te = (TextView) view.findViewById(R.id.te_adjeusaaaa);
        te.setVisibility(View.VISIBLE);
        te.setText(arraylistcode.get(i));
//        if (i==0){
//            te.setTextColor(Color.BLUE);
//        }
        return view;
    }






}
